# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/07/02 15:27:03-06:00 bjorn.helgaas@hp.com # [PATCH] ia64: force all kernel sections into one and the same segment # # Older versions of the linker do not handle cross-segment segment-relative # relocations properly. This becomes a real problem when the linker decides # to put .text and .text.init into different segments (for whatever reasons) # because in that case, broken linkers will produce a broken unwind section, # which can cause nasty Heisenbugs, where, for example, unwinding may or may # not work depending on the exact value of the IP in a function. # # [Backport of Keith Owens' 2.6 change] # # arch/ia64/vmlinux.lds.S # 2004/07/02 15:27:00-06:00 bjorn.helgaas@hp.com +7 -0 # [PATCH] ia64: force all kernel sections into one and the same segment # # Older versions of the linker do not handle cross-segment # segment-relative relocations properly. This becomes a real problem # when the linker decides to put .text and .text.init into different # segments (for whatever reasons) because in that case, the broken # linker will produce a broken unwind section which intermingles # unwind info from the two sections. Fix is to simply force all sections # into the same segment. # # ia64: force all kernel sections into one and the same segment # diff -Nru a/arch/ia64/vmlinux.lds.S b/arch/ia64/vmlinux.lds.S --- a/arch/ia64/vmlinux.lds.S 2004-07-14 15:22:23 -07:00 +++ b/arch/ia64/vmlinux.lds.S 2004-07-14 15:22:23 -07:00 @@ -7,6 +7,10 @@ OUTPUT_FORMAT("elf64-ia64-little") OUTPUT_ARCH(ia64) ENTRY(phys_start) +PHDRS { + code PT_LOAD; + data PT_LOAD; +} SECTIONS { /* Sections to be discarded */ @@ -23,6 +27,7 @@ v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */ phys_start = _start - PAGE_OFFSET; + code : { } :code . = KERNEL_START; _text = .; @@ -142,6 +147,7 @@ .kstrtab : AT(ADDR(.kstrtab) - PAGE_OFFSET) { *(.kstrtab) } + data : { } :data .data : AT(ADDR(.data) - PAGE_OFFSET) { *(.data) *(.gnu.linkonce.d*) CONSTRUCTORS } @@ -165,6 +171,7 @@ . = ALIGN(64 / 8); _end = .; + code : { } :code /* Stabs debugging sections. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) }